package com.moonlity.myspring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAuto {
    public static void main(String[] args) {

    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-idol.xml");
    //        根据id获取到的接口
    Hero hero= (Hero) applicationContext.getBean("guanyu");
        hero.perform();
    }
}
